package cn.tiancaifan.micro.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * (Joblevel)实体类
 *
 * @author makejava
 * @since 2020-05-12 10:20:51
 */
public class Job implements Serializable {
    
    private Integer id;
    /**
    * 职称名称
    */
    private String name;
    
    private Integer levelId;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createDate;
    
    private Integer enabled;

    private Level level;
    public Job() {

    }

    public Job(String name) {
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Job jobLevel = (Job) o;
        return Objects.equals(name, jobLevel.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name);
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLevelId() {
        return levelId;
    }

    public void setLevelId(Integer levelId) {
        this.levelId = levelId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getEnabled() {
        return enabled;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    public Level getLevel() {
        return level;
    }

    public void setLevel(Level level) {
        this.level = level;
    }

    @Override
    public String toString() {
        return "Job{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", levelId=" + levelId +
                ", createDate=" + createDate +
                ", enabled=" + enabled +
                ", level=" + level +
                '}';
    }
}